<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>课程修改</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
 
 <script src="plug-in/jquery-plugs/form/jquery.form.js"></script>
  <script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.config.js"></script>
   <script type="text/javascript" charset="utf-8" src="plug-in/ueditor/ueditor.all.min.js"> </script> 
   <script type="text/javascript" charset="utf-8" src="plug-in/ueditor/lang/zh-cn/zh-cn.js"></script>
   <script type="text/javascript" src="plug-in/Validform/js/Validform_v5.3.1_min_zh-cn.js"></script>
   <script type="text/javascript" src="plug-in/Validform/js/Validform_Datatype_zh-cn.js"></script>
   <script type="text/javascript" src="plug-in/Validform/js/datatype_zh-cn.js"></script>
   <link rel="stylesheet" href="plug-in/Validform/css/style.css" type="text/css">
   <link rel="stylesheet" href="plug-in/Validform/css/tablefrom.css" type="text/css">
 </head>
 
 <body>

  <t:formvalid formid="formobj" dialog="true" usePlugin="password" 
  			layout="table" action="labLessonController.do?doAdd" tiptype="3">
  			<input type="hidden" name="id" value="${lesson.id }"/>
		<table style="" cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td align="right">
						<label class="Validform_label">
							课程编号:
						</label>
					</td>
					<td class="value">
					     	 <input id="lessonNo" name="lessonNo" type="text"
					     	 style="width: 150px" class="inputxt"  datatype="*" maxlength="80" value='${lesson.lessonNo }'>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">课程编号</label>
						</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							课程名称:
						</label>
					</td>
					<td class="value">
					     	 <input id="lessonZhName" name="lessonZhName" type="text"
					     	 style="width: 150px" class="inputxt"  datatype="*" maxlength="80" value='${lesson.lessonZhName }'>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">课程名称</label>
						</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							英文名称:
						</label>
					</td>
					<td class="value">
					     	 <input id="lessonEnName" name="lessonEnName" type="text"
					     	 style="width: 150px" class="inputxt"  maxlength="80" value='${lesson.lessonEnName }'>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">英文名称</label>
						</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							开课院系:
						</label>
					</td>
					<td class="value">
						<t:CommonSelect value="${lesson.collegeId }" textField="text" idField="id" url="dictCollegeController.do?select" name="collegeId"></t:CommonSelect>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">开课院系</label>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							面向专业:
						</label>
					</td>
					<td class="value">
						<t:CommonSelect value="${lesson.majorId }" textField="text" idField="id" url="dictMajorController.do?comboboxSelect" name="majorId"></t:CommonSelect>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">面向专业</label>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							学历层次:
						</label>
					</td>
					<td class="value">
						<t:CommonSelect value="${lesson.certificationLevel}" textField="text" idField="id" url="labLessonController.do?initCertificationLevel" name="certificationLevel"></t:CommonSelect>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">学历层次</label>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							总学时:
						</label>
					</td>
					<td class="value">
					     	 <input id="sumHours" name="sumHours" type="text"
					     	 style="width: 150px" class="inputxt"  datatype="n" maxlength="20" value='${lesson.sumHours }'>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">总学时</label>
						</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							学分:
						</label>
					</td>
					<td class="value">
					     	 <input id="score" name="score" type="text"
					     	 style="width: 150px" class="inputxt"  datatype="*" maxlength="10" value='${lesson.score }' onkeyup="validateScore(this)">
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">学分</label>
					</td>
				</tr>
				<tr>
		         <td>
		         	<div style='line-height:30px;'>课程介绍：</div>
		       	</td>
		       	<td> 
		         	<script name='description' id="detailEditor" type="text/plain" style="width:700px;height:200px;">${lesson.description}</script>
		         </td>
			</table>
		</t:formvalid>
 </body>  	
 <script>
	 $(document).ready(function () {
		//判断是否是查看页面,不是查看页面，初始化编辑器
		if(location.href.indexOf("load=detail")==-1){
			UE.getEditor("detailEditor",{});//初始化editor控件
		}else{
			UE.getEditor("detailEditor",{
				readonly:true, 
				toolbars: []
			});//初始化editor控件
		}
	 });
	 
	 function validateScore(obj){
		 var value = obj.value + '';
		 obj.value = value.replace(/[^0-9.]/g,'')
	 }
 </script>
